package designPattern.facade;

/**
 * Created by cdxuhongya on 2017/1/6.
 */
public class Computer implements Device{

    private Device cpu;
    private Device mem;
    private Device disk;

    public Computer(){
        cpu = new Cpu();
        mem = new Memory();
        disk = new Disk();
    }

    public void startup() {
        System.out.println("computer startup");
        cpu.startup();
        mem.startup();
        disk.startup();
    }

    public void shutdown() {
        disk.shutdown();
        mem.shutdown();
        cpu.shutdown();
        System.out.println("computer shuntdown");
    }
}
